package com.share.controller.manager;

import cn.dev33.satoken.annotation.SaIgnore;
import com.share.domain.OpenIdResult;
import com.share.result.JSONResult;
import com.share.service.WechatRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/wechat")
public class WechatRegisterController {
    @Autowired
    private WechatRegisterService wechatRegisterService;
    @GetMapping("/register/{code}")
    @SaIgnore
    public JSONResult<OpenIdResult> getOpenId(@PathVariable("code")String code){
        return wechatRegisterService.getOpenId(code);
    }
}
